package com.hoshiicloud.user.feign;

import com.hoshiicloud.user.feign.hystrix.HystrixIdGeneratorFeignFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.LinkedList;

/**
 * @title: IdGeneratorService
 * @author zhangshuhu
 * @projectName hoshiicloud
 * @description: 主键服务
 * @since 2019-05-21
 */
@FeignClient(name = "hoshiicloud-id-generator", fallback = HystrixIdGeneratorFeignFallback.class)
@Repository
public interface IdGeneratorService {

	/**
	 * 获取主键
	 *
	 *
	 * @return String
	 */
	@GetMapping("/getuuId")
	String queryGeneratorId();

	@GetMapping(value = "/getComUserCode")
	String getComUserCode();

	@GetMapping(value = "/getPlatCousomerCode")
	String getPlatCousomerCode();


	/**
	 *
	 * @Description: 获取n个全局唯一的19位数字ID
	 * @author Mr.wu
	 * @param count
	 * @return
	 * @date: 2019年4月23日 下午4:16:56
	 */
	@RequestMapping(value = "/getuuIdSet", method = RequestMethod.POST)
	LinkedList<String> getIdList(int count);
}
